In recent years, a three-dimensional memory in which memory cells are three-dimensionally arranged has been developed. In the three-dimensional memory, in order to increase the storage capacity thereof, the number of memory cells stacked in layers is increasing, and the diameter of a memory hole is becoming smaller. Accordingly, the aspect ratio of a memory hole has become very high. A mask material used for forming memory holes with such a high aspect ratio is highly resistant to etching and is very thick in film thickness. When such a mask material is processed by using an oxide mask, ions in the etching gas may collide with the oxide mask for a long period of time. This may gradually deform the oxide mask and then block a pattern of memory holes.